// NewPartCommand.h: interface for the NewPartCommand class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_NEWPARTCOMMAND_H__6A4EDB44_71A4_4405_A7E5_363470F18374__INCLUDED_)
#define AFX_NEWPARTCOMMAND_H__6A4EDB44_71A4_4405_A7E5_363470F18374__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

class Part;
#include "UndoCommand.h"
#include "AutoCADCommandLineCommand.h"
#include "MoveJig.h"
class Joint;
class SupportHanger;
class JointFunction;
class NewPartCommand : public UndoCommand, public AutoCADCommandLineCommand  
{
public:
	NewPartCommand();
	virtual ~NewPartCommand();

public:
	virtual BOOL Execute();

private:
	INT NewPartEntity(AcDbHandle& handle);
	BOOL GetBasePoint(EntityJig::MoveJig& movejig);
	AcDbEntity* NewPartEntity(Part* pPart);
	void AddAttach(Joint* pJoint);
	void DrawAttach(Joint* pJoint);
	void CheckSuperPositionPort(Part* pPart, SupportHanger* pSH);
	void AddJointToSH(Joint* pJoint, SupportHanger* pSH);

private:
	Part* m_pPart;
	SupportHanger* m_pSH;
	JointFunction* m_pJoint;
};

#endif // !defined(AFX_NEWPARTCOMMAND_H__6A4EDB44_71A4_4405_A7E5_363470F18374__INCLUDED_)
